{extend name="base" /}
{block name="content"}
<script src="__STATIC__/public/My97DatePicker/WdatePicker.js"></script>
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>系统</span>
            <span class="icon-angle-right"></span>
            <span>数据统计</span>
            <span class="icon-angle-right"></span>
            <span>优惠劵统计</span>
            <span class="icon-angle-right"></span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <table class="m-table">
                <tr>
                    <th>
                        <div class="m-options cf">
                            <div class="m-search fr">
                                <form action="" class="layui-form" id="searchForm">
                                    <style>
                                        .xiadanhuiyuan{display: inline-block;position: relative}
                                        .xiadanhuiyuan-mask{    position: absolute;
                                            left: 70px;
                                            top: 26px;
                                            background: #fff;
                                            width: 211px;}
                                        .store{display: inline-block;position: relative}
                                        .store-mask{    position: absolute;
                                            left: 40px;
                                            top: 26px;
                                            background: #fff;
                                            width: 211px;}
                                    </style>
                                    <div class="xiadanhuiyuan">
                                        <label for="keywords">员工</label>
                                        <input type="text" name="keywords" id="keywords" class="u-ipt u-ipt-def" placeholder="请输入员工" value="{$keywords}" />
                                        <ul class="xiadanhuiyuan-mask">
                                        </ul>
                                    </div>
                                    <div class="store">
                                        <ul class="store-mask">
                                        </ul>
                                        <label for="">核销时间（日）</label>
                                        <input type="text" name="riTime" class="u-ipt u-ipt-small" placeholder="核销时间(日)" value="{$riTime ?: ''}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly />
                                        <label for="">核销时间（月）</label>
                                        <input type="text" name="yueTime" class="u-ipt u-ipt-small" placeholder="核销时间(月)" value="{$yueTime ?: ''}" onfocus="WdatePicker({dateFmt:'yyyy-MM'})" readonly />
                                        <input type="submit" class="u-btn u-search" value="查看" />
<!--                                        <input type="button" class="u-btn u-export" value="导出" />-->
                                    </div>
                                    <!--<label for="keywords">下单会员</label>-->

                                    <!--<input type="text" name="keywords" id="keywords" class="u-ipt u-ipt-def" placeholder="请输入要会员" value="{$keywords}" />-->




                                </form>
                            </div>
                        </div>
                    </th>
                </tr>
            </table>
            <form class="layui-form m-list-form">
                <table class="m-table mt-10">
                    <tbody class="datas">
                    <tr>
                        <!--                        	<th width="5%" style="text-align: center;">选择</th>-->
<!--                        <th width="5%">ID</th>-->
                        {if condition="$yueTime neq '' "}
                            <th width="5%">年-月</th>
                        {else/}
                            <th width="5%">年-月-日</th>
                        {/if}
                        <th width="5%">员工姓名</th>
                        {foreach name="header" item="v"}
                            <th width="8%">{$v.coupon_name}</th>
                        {/foreach}
                    </tr>
                    {foreach name="data" item="v"}
                    <tr>
                        <td>{$day}</td>
                        <td>{$v.staff_name}</td>
                        {foreach name="$v.staff_used_numbers" item="c"}
                        <td><a href="{:url('verification_log', ['staff_id' => $v.staff_id,'coupon_id'=>$c.id])}">{$c.count}</a></td>
                        {/foreach}
                    </tr>
                    {/foreach}
                    <tr>
                        <!--                        <td align="center"><input type="checkbox" value="1" lay-skin="primary" lay-filter="select_ids" /></td>-->
                        <!--                        <td colspan="10" class="m-options"><button class="u-btn u-batch-del"><i class="icon-trash"></i>批量删除</button></td>-->
                    </tr>
                    </tbody>
                </table>
            </form>
            {include file="public:page" /}
        </div>
    </div>
</div>
{/block}
{block name="extrajs"}

{include file="laypage" /}
{/block}